<?php

define('LOG_DIR', dirname(MO_WEBAPP_DIR));

function xlog($msg) 
{
	$fp = fopen(LOG_DIR . '/debug.log', "a");
	flock($fp, LOCK_EX) ;
	fwrite($fp, strftime("%Y-%m-%d-%H：%M：%S",time()) . " " . $msg . "\n");
	flock($fp, LOCK_UN);
	fclose($fp);
}
?>